<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div>
<!--    <ul id ="seckillSkuContent"></ul>-->

    <p id="demo"></p>
    <button onclick="numbers.data.forEach(myFunction)">点我</button>
</div>

</body>

<script type="text/javascript">
    var numbers = {
        "msg": "success",
        "code": 0,
        "data": [{
            "promotionId": null,
            "promotionSessionId": 3,
            "skuId": 14,
            "seckillPrice": 1,
            "seckillCount": 6,
            "seckillLimit": 6,
            "seckillSort": 0,
            "skuInfo": {
                "skuId": 14,
                "spuId": 6,
                "skuName": "小米11 12G+256GB 蓝色 套餐版【含55w充电套餐】",
                "skuDesc": null,
                "catalogId": 225,
                "brandId": 2,
                "skuDefaultImg": "https://gulimall-cgimage.oss-cn-hangzhou.aliyuncs.com/2021-11-20/ddf0b4e3-4d5b-44dd-8060-77cc58a79d40_73ab4d2e818d2211.jpg",
                "skuTitle": "小米11 12G+256GB 蓝色 套餐版【含55w充电套餐】",
                "skuSubtitle": "小米11 8G+128GB 蓝色 套餐版【含55w充电套餐】",
                "price": 3502.0,
                "saleCount": 0
            },
            "startTime": 1642176007000,
            "endTime": 1642348801000,
            "randomCode": "7b912b0a0a3d4023a1d11b5d5b4e9c8b"
        }]
    };

    demoP = document.getElementById("demo");
    function myFunction(item) {
        demoP.innerHTML = demoP.innerHTML + "index[" + item.id  + "]: " + item.relationSkus.skuId + "<br>";

        // $("<li onclick='toDetail(" + item.skuId + ")'></li>")
        //     .append($("<img style='width: 130px; height: 130px' src='" + item.skuInfo.skuDefaultImg + "' />"))
        //     .append($("<p>"+item.skuInfo.skuTitle+"</p>"))
        //     .append($("<span>" + item.seckillPrice + "</span>"))
        //     .append($("<s>" + item.skuInfo.price + "</s>"))
        //     .appendTo(demoP);
    }
</script>
</html>